﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Controls_Slideshow : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (IsPostBack)
            return;

        List<SlideShow> list = new SlideShowDAO().HienThiSlideShow();
        imgSlideShow1.ImageUrl = "~/" + list[0].TenHinh;
        imgSlideShow1.AlternateText = list[0].ChuThich;

        imgSlideShow2.ImageUrl = "~/" + list[1].TenHinh;
        imgSlideShow2.AlternateText = list[1].ChuThich;

        imgSlideShow3.ImageUrl = "~/" + list[2].TenHinh;
        imgSlideShow3.AlternateText = list[2].ChuThich;

        imgSlideShow4.ImageUrl = "~/" + list[3].TenHinh;
        imgSlideShow4.AlternateText = list[3].ChuThich;

        imgSlideShow5.ImageUrl = "~/" + list[4].TenHinh;
        imgSlideShow5.AlternateText = list[4].ChuThich;

        imgSlideShow6.ImageUrl = "~/" + list[5].TenHinh;
        imgSlideShow6.AlternateText = list[5].ChuThich;

        imgSlideShow7.ImageUrl = "~/" + list[6].TenHinh;
        imgSlideShow7.AlternateText = list[6].ChuThich;

        imgSlideShow8.ImageUrl = "~/" + list[7].TenHinh;
        imgSlideShow8.AlternateText = list[7].ChuThich;

        imgSlideShow9.ImageUrl = "~/" + list[8].TenHinh;
        imgSlideShow9.AlternateText = list[8].ChuThich;

        imgSlideShow10.ImageUrl = "~/" + list[9].TenHinh;
        imgSlideShow10.AlternateText = list[9].ChuThich;
    }
}